/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);

  router.get('/personal', controller.personal.personal);
  router.post('/changePersonal', controller.personal.changePersonal);
  router.post('/changePassword', controller.personal.changePassword);
  router.get('/myBook', controller.personal.myBook);
  router.get('/unfollow', controller.personal.unfollow);
  router.get('/myComment', controller.personal.myComment);

  // 小说发布
  router.post('/bRelease', controller.bRelease.index);
  // 小说更新
  router.post('/bupdata', controller.bupdata.index);
  // 作品栏
  router.get('/works', controller.works.index);


  // 登录
  router.post('/passwordlogin', controller.login.passwordlogin);
  // router.post('/yzmlogin', controller.login.yzmlogin);
  router.post('/sendEmail', controller.login.sendEmail);
  router.post('/login', controller.login.login);



  // 更新章节
  router.post('/bupdata', controller.bupdata.index);
  // 评论
  router.get('/comment', controller.yj.comment);//发布评论

  router.get('/book', controller.yj.book);//查询小说
  router.get('/chapter', controller.yj.chapter);//查询最新章节
  router.get('/comments', controller.yj.comments);//查询最新评论
  router.get('/zuishu', controller.yj.zuishu);//追书
  router.get('/zuishu2', controller.yj.zuishu2);//追书2


  // 章节详情
  router.get('/chapter/getinfo', controller.chapter.getInfo)
  router.get('/chapter/whetherlogin', controller.chapter.whetherlogin)
  router.get('/chapter/insertinfo', controller.chapter.InsertInfo)
  // 书籍目录页面
  router.get('/directory', controller.directory.getInfo)
  //首页
  router.get('/GetNovel', controller.novel.GetNovel);


};
